home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_gnu / include / dir.h < prev    next >
C/C++ Source or Header  |  1996-01-30  |  1KB  |  54 lines

  1. #ifndef _DIR_H_
  2. #define _DIR_H_
  3.  
  4. struct ffblk {
  5.   char ff_reserved[21];
  6.   char ff_attrib;
  7.   short ff_ftime;
  8.   short ff_fdate;
  9.   short ff_filler;
  10.   long ff_fsize;
  11.   char ff_name[16];
  12. };
  13.  
  14. #define FA_RDONLY       1
  15. #define FA_HIDDEN       2
  16. #define FA_SYSTEM       4
  17. #define FA_LABEL        8
  18. #define FA_DIREC        16
  19. #define FA_ARCH         32
  20.  
  21. /* for fnmerge/fnsplit */
  22. #define MAXPATH   80
  23. #define MAXDRIVE  3
  24. #define MAXDIR      66
  25. #define MAXFILE   9
  26. #define MAXEXT      5
  27.  
  28. #define WILDCARDS 0x01
  29. #define EXTENSION 0x02
  30. #define FILENAME  0x04
  31. #define DIRECTORY 0x08
  32. #define DRIVE      0x10
  33.  
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37.  
  38. int findfirst(const char *pathname, struct ffblk *ffblk, int attrib);
  39. int findnext(struct ffblk *ffblk);
  40.  
  41. void fnmerge (char *path, const char *drive, const char *dir,
  42.                  const char *name, const char *ext);
  43. int fnsplit (const char *path, char *drive, char *dir, 
  44.                  char *name, char *ext);
  45.  
  46. int getdisk(void);
  47. int setdisk(int drive);
  48.  
  49. #ifdef __cplusplus
  50. }
  51. #endif
  52.  
  53. #endif
  54.